package org.wevil.params.add;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**注册参数*/
@Getter
@Setter
@ToString
public class UserAP {
    /**用户名*/
    @NotBlank(message = "用户名不能为空")
    @Length(message = "用户名长度为 {min} 到 {max} 之间", min=2, max=20)
    private String username;
    /**密码*/
    @NotBlank(message = "密码不能为空")
    @Length(message = "密码长度为 {min} 到 {max} 之间", min=3, max=30)
    private String password;
    /**真实姓名*/
    @NotBlank(message = "真实姓名不能为空")
    private String realname;
    /**手机号*/
    @NotBlank(message = "手机号不能为空")
    @Length(message = "手机号长度为 {min} 位", min=11, max=11)
    private String tel;
    /**邮箱*/
    private String email;
    /**头像资源id*/
    private Integer avatarId;
    /**用户地址*/
    private String address;
    /**身份证号*/
    private String idcard;
}
